<?php

namespace app\index\dao;

use app\common\model\MemberMatchRecord;
use ShidianUtil\Thinkphp\Dao\DaoTrait;

/**
 * MemberMatchRecordDao 数据访问对象
 * Class MemberMatchRecordDao
 * @package app\index\dao
 * @method MemberMatchRecord findByPK(?int $id, $field = true)
 * @method \think\Collection selectAll(?int $page, ?int $page_size, $field = true)
 * @method MemberMatchRecord insertActive(array $params, array $allow_field = [])
 * @method MemberMatchRecord updateActive(MemberMatchRecord $model, array $params, array $allow_field = [])
 * @method MemberMatchRecord findAndUpdateActive(int $id, array $params, array $allow_field = [])
 * @method MemberMatchRecord updateActiveByClosure(\Closure $closure, array $params, array $allow_field = [])
 * @method void deleteModel(MemberMatchRecord $model)
 * @method void deleteById(int|array|\Closure $id, bool $force = false)
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037579
 * @link https://www.kancloud.cn/manual/think-orm/1257998
 * @link https://www.kancloud.cn/thinkphp/master-database-and-model/265551
 */
class MemberMatchRecordDao
{
    use DaoTrait;

    /**
     * @var MemberMatchRecord
     */
    private $baseModel;

    /**
     * MemberMatchRecordDao constructor.
     */
    public function __construct()
    {
        $this->baseModel = MemberMatchRecord::class;
    }

    /**
     * 插入记录
     * @param $memberId
     * @param $consultingId
     * @param $matchType
     * @return void
     */
    public function insert($memberId, $consultingId, $matchType)
    {
        $params = [
            'memberId' => $memberId,
            'consultingId' => $consultingId,
            'matchType' => $matchType,
        ];
        $this->insertActive($params);
    }
}
